public class VehiclePowerAdapter implements DC6V {
    private int vehicleVoltage; // 车辆需要的电压

    public VehiclePowerAdapter(int vehicleVoltage) {
        this.vehicleVoltage = vehicleVoltage;
    }

    @Override
    public int outPut6V() {
        // 模拟将输入电压转换为6V输出
        int adapterOutput = this.vehicleVoltage / 8;
        System.out.println("转换完成，输出电压为：" + adapterOutput + "V");
        return adapterOutput;
    }

    @Override
    public int outPut12() {
        // 模拟将输入电压转换为12V输出
        int adapterOutput = this.vehicleVoltage / 4;
        return adapterOutput;
    }

    @Override
    public int outPut24() {
        // 模拟将输入电压转换为24V输出
        return this.vehicleVoltage / 2;
    }

    public int getVehicleVoltage() {
        return vehicleVoltage;
    }

    public void setVehicleVoltage(int vehicleVoltage) {
        this.vehicleVoltage = vehicleVoltage;
    }
}